import request from '@/utils/request'

export const listTMeals = (search) =>
    request({
        url: '/tMeals',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            name: search.name
        }
    })
//查询所有的分类
  export const listTMealsType = () =>
    request({
        url: '/tMealsType',
        method: 'get'
    })

  export const getTMealsById = (id) =>
    request({
      url: '/tMeals/' + id,
      method: 'get'
    })

  export const saveTMeals = (evaluate) =>
    request({
      url: '/tMeals',
      method: 'post',
      data: evaluate
    })
export const updateTMeals = (id, evaluate) =>
    request({
      url: '/tMeals/' + id,
      method: 'put',
      data: evaluate
    })

export const removeTMeals = (id) =>
  request({
      url: '/tMeals/' + id,
      method: 'delete'
  })
